package demo.java.java8.Lambdas.demo8;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

public class MyDemo {

	public static void main(String[] args) {
//		Map<CaloricLevel, List<Dish>> dishesByCaloricLevel=Test.menu
//				.stream().collect(Collectors.groupingBy(
//							Dish::getCaloricLevel));
//		System.out.println(dishesByCaloricLevel);
//		List<String> collect = Test.menu.parallelStream()
//		.filter(d -> d.getCalories() > 300)
//		.map(Dish::getName).collect(Collectors.toList());
//		System.out.println(collect);
		
		List<Integer> numbers = Arrays.asList(3, 5, 1, 2, 6);
		System.out.println(numbers);
		numbers.sort(Comparator.reverseOrder());
		System.out.println(numbers);
		
	}
}
